﻿using System;
using DTO;
using DAO;
using System.Data;

namespace BUS
{
    public class BUSQuanLyMonHoc
    {
        public static System.Data.DataTable DanhSachMonHoc()
        {
            try
            {
                return DAOQuanLyMonHoc.DanhSachMonHoc();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static DataTable KhoiLop()
        {
            try
            {
                return DAOQuanLyMonHoc.DanhSachKhoiLop();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static DataTable MonHocKhoiLop()
        {
            try
            {
                return DAOQuanLyMonHoc.MonHocKhoiLop();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static DataTable TimKiemMonHoc(DTOMonHoc monhoc)
        {
            try
            {
                return DAOQuanLyMonHoc.TimKiemMonHoc(monhoc);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static void ThemMonHoc(DTOMonHoc monhoc)
        {
            try
            {
                int ketqua = 0;
                ketqua = DAOQuanLyMonHoc.ThemMonHoc(monhoc);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static void SuaTenMonHoc(DTOMonHoc monhoc)
        {
            try
            {
                int ketqua = 0;
                ketqua = DAOQuanLyMonHoc.SuaTenMonHoc(monhoc);
            }
            catch (Exception ex)
            {
                throw ex;
            }    
        }

        public static void XoaMonHoc(DTOMonHoc monhoc)
        {
            try
            {
                int ketqua = 0;
                ketqua = DAOQuanLyMonHoc.XoaMonHoc(monhoc);
            }
            catch (Exception ex)
            {
                throw ex;
            }    
        }

        public static DataTable LietKeMonHoc(DTOKhoiLop khoilop)
        {
            try
            {
                DataTable data = DAOQuanLyMonHoc.LietKeMonHoc(khoilop);
                return data;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static void ThemMonHocKhoiLop(DTOMonHocKhoiLop monhockhoilop)
        {
            try
            {
                int kq = DAOQuanLyMonHoc.ThemMonHocKhoiLop(monhockhoilop);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static void XoaMonHocKhoiLop(DTOMonHocKhoiLop monhockhoilop)
        {
            try
            {
                int kq = DAOQuanLyMonHoc.XoaMonHocKhoiLop(monhockhoilop);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
